package com.shuai.context;

public class BaseContext {

    public static ThreadLocal<LoginInfo> threadLocal = new ThreadLocal<>();

    //存储当前登录用户id或企业id
    public static void setCurrentLoginInfo(LoginInfo loginInfo) {
        threadLocal.set(loginInfo);
    }

    public static LoginInfo getCurrentLoginInfo() {
        return threadLocal.get();
    }


    public static void removeCurrentLoginInfo() {
        threadLocal.remove();
    }

}
